import { isEmpty, validaEmpty } from "@/utils/validate";

interface typeOption {
  label: string;
  value: string | number;
  tagType?: string;
}
export function filterOption(
  val: string | undefined | number,
  option: typeOption[]
): string | undefined | number {
  if (isEmpty(val)) return val;
  const data = option && option.find((v: any) => v.value == val);
  return data?.label || val;
}
